<?php
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category   AW
 * @package    AW_Mobile
 * @copyright  Copyright (c) 2010-2011 aheadWorks Co. (http://www.aheadworks.com)
 * @license    http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
?>
<div class="account-box ad-orders">
<?php $_orders = $this->getOrders(); ?>
    <div class="page-head">
        <h3><?php echo $this->__('Recent Orders') ?></h3>
        <?php if(0 && sizeof($_orders->getItems()) > 0 ): ?><div style="margin:5px 0;"><a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a></div><?php endif; ?>
    </div>
    <?php if( sizeof($_orders->getItems()) > 0 ): ?>
        <table cellspacing="0" class="shopping-cart checkout-review" id="my-orders-table">
 <!--           <thead>
                <tr>
                    <th><?php echo $this->__('Order #') ?></th>
                    <th><?php echo $this->__('Date') ?></th>
                    <th><?php echo $this->__('Total') ?></th>
                    <th><?php echo $this->__('Status') ?></th>
                </tr>
            </thead> -->
            <tbody>
            <?php $_odd = ''; ?>
                <?php foreach ($_orders as $_order): ?>
                    <tr class="<?php echo ($_odd = ($_odd ? 'odd' : '')) ?>">
                        <td><a href="<?php echo $this->getViewUrl($_order) ?>"><?php echo $_order->getRealOrderId() ?></a>&nbsp;</td>
                        <td><?php echo $this->formatDate($_order->getCreatedAtStoreDate()) ?> </td>
                        <td><?php echo $_order->formatPrice($_order->getGrandTotal()) ?>&nbsp;</td>
                        <td><em><?php echo $_order->getStatusLabel() ?></em>&nbsp;</td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
        <script type="text/javascript">decorateTable('my-orders-table')</script>
    <?php else: ?>
        <p><?php echo $this->__('You have placed no orders.'); ?></p>
    <?php endif; ?>
</div>
